<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>信用信息</title>
	<script src="../../../js/header.js"></script>
</head>

<body>
<div v-cloak id="app" style="overflow: hidden;">
	<el-row type="flex" justify="center">
		<el-col :span="15">
			<el-breadcrumb separator-class="el-icon-arrow-right" style="margin-top: 20px;">
				<el-breadcrumb-item :to="{ path: '/' }"  @click.native="gobackmain()">首页</el-breadcrumb-item>
				<el-breadcrumb-item>信用信息</el-breadcrumb-item>
			</el-breadcrumb>
			<div style="margin-top: 10px;border-bottom:1px solid rgba(200,200,200,0.43);">
				<el-form :model="selectForm" ref="selectForm" label-width="150px">
					<el-row>
						<el-col :span="8">
							<el-form-item label="企业分类:" prop="enterpriseClassification" label-width="110px">
								<el-select v-model="selectForm.enterpriseClassification" placeholder="请选择" style="">
									<el-option label="A" value="A"></el-option>
									<el-option label="B" value="B"></el-option>
									<el-option label="C" value="C"></el-option>
									<el-option label="D" value="D"></el-option>
									<el-option label="E" value="E"></el-option>
								</el-select>
							</el-form-item>
						</el-col>
						<el-col :span="12">
							<el-form-item label="企业分数:" prop="" label-width="160px">
								<el-row>
									<el-col span="5" style="width: 180px;">
										<el-form-item prop="startScore">
											<el-tooltip class="item" effect="dark" content="评价单位分数介于1000~2000之间" placement="top-start">
											<el-input v-model="selectForm.startScore" type="number" @blur="checkPriseScore()" :min="0" @keydown.native="channelInput" placeholder="" ></el-input>
											</el-tooltip>
										</el-form-item>
									</el-col>
									<el-col span="1" style="color: rgb(192, 204, 218);text-align: center;">
										<span>—</span>
									</el-col>
									<el-col :span="5" style="">
										<el-form-item prop="endScore">
											<el-tooltip class="item" effect="dark" content="评价单位分数介于1000~2000之间" placement="top-start">
											<el-input v-model="selectForm.endScore" type="number" @blur="checkPriseScore1()" :min="0" @keydown.native="channelInput" placeholder="" style="width: 180px;"></el-input>
											</el-tooltip>
										</el-form-item>
									</el-col>
								</el-row>
							</el-form-item>
						</el-col>
					</el-row>
					<el-row>
						<el-col :span="8">
							<el-form-item label="企业名称:" prop="enterpriseName" label-width="110px">
								<el-input v-model="selectForm.enterpriseName" placeholder="" style=""></el-input>
							</el-form-item>
						</el-col>
						<!--<el-col :span="8">
							<el-form-item label="信用评估状态:" prop="status" label-width="160px">
								<el-select v-model="selectForm.status" placeholder="请选择" >
									<el-option label="已接收" value="0"></el-option>
									<el-option label="已调整" value="1"></el-option>
									<el-option label="已反馈" value="2"></el-option>
								</el-select>
							</el-form-item>
						</el-col>-->
						<el-col>
							<div style="float: right;">
								<el-button type="primary" size="small" style="width: 60px;height: 30px;" @click="searchForm('selectForm')">查询</el-button>
								<el-button type="warning" size="small" style="width: 60px;height: 30px;" @click="resetForm('selectForm')">重置</el-button>
							</div>
						</el-col>
					</el-row>
				</el-form>
			</div>

			<el-table :data="tableData" border style="width: 100%;margin-top: 35px;" @selection-change="handleSelectionChange" ref="multipleTable"
			  @selection-change="handleSelectionChange" :header-cell-style="{background:'#eef1f6',color:'#606266'}">
				<el-table-column type="selection"></el-table-column>
				<el-table-column
					type="index"
					label="序号"
					width="50" align="center">
				</el-table-column>
				<el-table-column
						prop="enterpriseName"
						label="企业名称"
						width="140"
						align="center" >
				</el-table-column>
				<el-table-column
						prop="enterpriseIdType"
						label="企业证件类型"
						width="140"
						align="center">
				</el-table-column>
				<el-table-column
						prop="enterpriseIdNumber"
						label="企业证件号码"
						width="120"
						align="center">
				</el-table-column>
				<el-table-column
						prop="enterpriseScore"
						label="企业分数"
						width="80"
						align="center">
				</el-table-column>
				<el-table-column
						prop="enterpriseClassification"
						label="企业分类"
						width="80"
						align="center">
				</el-table-column>
				<el-table-column
						prop="assessmentDate"
						label="评估日期"
						width="100"
						align="center">
				</el-table-column>
				<el-table-column
						prop="status"
						label="信用评估状态"
						width="110"
						align="center">
					<template slot-scope="scope">
						<span v-if="scope.row.status=='0'" style="color:#F19437;">已接收</span>
						<span v-if="scope.row.status==1" style="color:#20A0FF;">已调整</span>
						<span v-if="scope.row.status==2" style="color:#67C23A;">已反馈</span>
					</template>
				</el-table-column>
				<el-table-column
						label="操作"
						width=""
						align="center">
					<template slot-scope="scope">
						<el-button type="" size="mini" @click="view(scope.$index,scope.row)">查看企业信用详情</el-button>
						<el-button type="" size="mini" @click="viewClue(scope.$index,scope.row)">企业信用线索详情</el-button>
					</template>
				</el-table-column>
			</el-table>
			<el-button type="primary" size="mini" @click="appovalExByIds()" style="margin-left: 20px;float: right;">导出</el-button>
			<el-button type="primary" size="mini" @click="appovalEx()" style="float: right;">批量导出</el-button>

			<div style="overflow: hidden;">
				<div class="pagination">
					<el-pagination
							@size-change="handleSizeChange"
							@current-change="handleCurrentChange"
							:current-page="currentPage"
							:page-sizes="[10, 20, 30, 40]"
							:page-size="pagesize"
							background
							layout="total, sizes,prev, pager, next"
							:total="tableTotal"
							prev-text="上一页"
							next-text="下一页">
					</el-pagination>
				</div>

			</div>
			<!--查看企业信用详情-->
			<el-dialog title="" :visible.sync="viewdialogForm" center fullscreen>
				<el-row type="flex" justify="center" style="margin-top: 15px;">
					<el-col :span="15">
						<div style="margin-top: 10px;">
					<el-form :model="Detail" :rules="rules" ref="Detail" label-width="140px">
						<el-row>
							<el-col :span="4" class="tab-title">
								企业信用详细信息
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="7">
								<el-form-item label="企业名称:"  prop="enterpriseName" label-width="110px">
									<el-input v-model="Detail.enterpriseName"  placeholder=""  disabled></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="企业证件类型:" prop="enterpriseIdType" label-width="190px">
									<el-input v-model="Detail.enterpriseIdType"  placeholder=""  disabled></el-input>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="7">
								<el-form-item label="企业证件号码:"  prop="enterpriseIdNumber" label-width="110px">
									<el-input v-model="Detail.enterpriseIdNumber"  placeholder="" disabled></el-input>
								</el-form-item>
							</el-col>
							<el-col :span="8">
								<el-form-item label="企业分类:" prop="enterpriseClassification" label-width="190px">
									<el-select v-model="Detail.enterpriseClassification" placeholder="请选择"  disabled>
										<el-option label="A" value="0"></el-option>
										<el-option label="B" value="1"></el-option>
										<el-option label="C" value="2"></el-option>
										<el-option label="D" value="3"></el-option>
										<el-option label="E" value="4"></el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="7">
								<el-form-item label="企业分数:"  prop="enterpriseScore" label-width="110px">
									<el-input v-model="Detail.enterpriseScore" placeholder="" disabled></el-input>
								</el-form-item>
							</el-col>
							<el-col span="8">
								<el-form-item label="信用评估状态:"  prop="status" label-width="190px">
									<el-select v-model="Detail.status" placeholder="请选择" disabled>
										<el-option label="已接收" value="0"></el-option>
										<el-option label="已调整" value="1"></el-option>
										<el-option label="已反馈" value="2"></el-option>
									</el-select>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="7">
								<el-form-item label="评估日期:" prop="assessmentDate"  label-width="110px">
									<el-date-picker
											disabled
											v-model="Detail.assessmentDate"
											type="date"
											value-format="yyyy-MM-dd"
											placeholder=""
											>
									</el-date-picker>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="22">
								<div style="float:right;">
									<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="viewdialogForm = false;">关闭</el-button>
								</div>
							</el-col>
						</el-row>
					</el-form>
				</div>
					</el-col>
				</el-row>
			</el-dialog>
			<!--查看信用线索企业详情-->
			<el-dialog title="" :visible.sync="viewcluedialogForm" center fullscreen>
				<el-row type="flex" justify="center" style="margin-top: 15px;">
					<el-col :span="15">
						<div style="margin-top: 10px;">
							<el-form :model="Clue" :rules="rules" ref="Clue" label-width="150px">
								<el-row>
									<el-col :span="5" class="tab-title">
										企业信用线索详细信息
									</el-col>
								</el-row>
									<el-row v-if="clueDisplay">
									<el-row>
										<el-col :span="12">
											<el-form-item label="企业名称:"  prop="enterpriseName" label-width="150px">
												<el-input v-model="Clue.enterpriseName"  placeholder=""  disabled></el-input>
											</el-form-item>
										</el-col>
										<el-col :span="12">
											<el-form-item label="企业证件类型:" prop="enterpriseIdType" label-width="150px">
												<el-input v-model="Clue.enterpriseIdType"  placeholder=""  disabled></el-input>
											</el-form-item>
										</el-col>
									</el-row>
									<el-row>
										<el-col :span="12">
											<el-form-item label="企业证件号码:"  prop="enterpriseIdNumber" label-width="150px">
												<el-input v-model="Clue.enterpriseIdNumber"  placeholder="" disabled></el-input>
											</el-form-item>
										</el-col>
										<el-col :span="12">
											<el-form-item label="信用线索原因:" prop="creditClueReasons" label-width="150px">
												<el-input v-model="Clue.creditClueReasons" placeholder="" disabled></el-input>
											</el-form-item>
										</el-col>
									</el-row>
									<el-row>
										<el-col :span="24">
											<el-form-item label="涉及负面详情:" prop="negativeDetails" label-width="150px" :required="reRemarkRequired">
												<el-input
														disabled
														type="textarea"
														:autosize="{ minRows: 8, maxRows: 8}"
														placeholder=""
														maxlength="500"
														show-word-limit
														v-model="Clue.negativeDetails">
												</el-input>
											</el-form-item>
										</el-col>
									</el-row>
									<el-row>
										<el-col :span="8">
											<el-form-item label="省级:"  prop="" label-width="150px">
												<el-select v-model="Clue.provincial" placeholder="请选择省"  @change="chooseProvince" style="" disabled>
													<el-option

															v-for="item in provinceData"
															:key="item.code"
															:label="item.name"
															:value="item.name">
													</el-option>
												</el-select>
											</el-form-item>
										</el-col>
										<el-col :span="8">
											<el-form-item label="市级:"  prop="" label-width="150px">
												<el-select v-model="Clue.municipalLevel" placeholder="请选择市"  @change="chooseCity" style="" disabled>
													<el-option

															v-for="item in cityData"
															:key="item.code"
															:label="item.name"
															:value="item.name">
													</el-option>
												</el-select>
											</el-form-item>
										</el-col>
										<el-col :span="8">
											<el-form-item label="县级:"  prop="" label-width="150px">
												<el-select v-model="Clue.countyLevel" @change="chooseArea"  placeholder="请选择区、县" style="" disabled>
													<el-option

															v-for="item in areaData"
															:key="item.code"
															:label="item.name"
															:value="item.name">
													</el-option>
												</el-select>
											</el-form-item>
										</el-col>
									</el-row>
									<el-row>
										<el-col :span="12">
											<el-form-item label="国标一级行业名称:" prop=""  label-width="150px">
												<el-input v-model="Clue.nationalStandard1Name" placeholder="" disabled></el-input>
											</el-form-item>
										</el-col>

										<el-col :span="12">
											<el-form-item label="国标二级行业名称:"  prop="" label-width="150px">
												<el-input v-model="Clue.nationalStandard2Name" placeholder="" disabled></el-input>
											</el-form-item>
										</el-col>
									</el-row>
									<el-row>
										<el-col :span="12">
											<el-form-item label="国标三级行业名称:" prop="" label-width="150px">
												<el-input v-model="Clue.nationalStandard3Name" placeholder="" disabled></el-input>
											</el-form-item>
										</el-col>
										<el-col :span="12">
											<el-form-item label="国标四级行业名称:"  prop="" label-width="150px">
												<el-input v-model="Clue.nationalStandard4Name" placeholder="" disabled ></el-input>
											</el-form-item>
										</el-col>
									</el-row>
									<el-row>
										<el-col :span="12">
											<el-form-item label="评估日期:" prop="" label-width="150px">
												<el-date-picker
														disabled
														v-model="Clue.evaluationDate"
														type="date"
														value-format="yyyy-MM-dd"
														placeholder=""
												>
												</el-date-picker>
											</el-form-item>
										</el-col>
										<el-col :span="12">
											<el-form-item label="信用评估状态:"  prop="status" label-width="150px">
												<el-select v-model="Clue.status" placeholder="请选择" disabled>
													<el-option label="已接收" value="0"></el-option>
													<el-option label="已调整" value="1"></el-option>
													<el-option label="已反馈" value="2"></el-option>
												</el-select>
											</el-form-item>
										</el-col>
									</el-row>
								</el-row>
								<el-row v-else style="margin-left: 30px;">
									<el-col>
										该企业无企业信用线索!
									</el-col>
								</el-row>

								<el-row>
									<el-col :span="22">
										<div style="float:right;">
											<el-button type="info" size="small" style="width: 60px;height: 30px;" @click="viewcluedialogForm = false;">关闭</el-button>
										</div>
									</el-col>
								</el-row>
							</el-form>
						</div>
					</el-col>
				</el-row>
			</el-dialog>
		</el-col>
	</el-row>
</div>
<script>
    var vm = new Vue({
        el: '#app',
        data() {
            // 验证手机号是否合法
            let checkMobile = (rule, value, callback) => {
                if (!this.checkTel(value) && value != '') {
                    callback(new Error('手机号码不合法'));
                } else {
                    callback();
                }
            };
            // 验证邮箱是否合法
            let checkEmail = (rule, value, callback) => {
                if (!this.isEmail(value) && value != '') {
                    callback(new Error('邮箱不合法'));
                } else {
                    callback();
                }
            };
            // 验证用户名是否合法
            let checkUserName = (rule, value, callback) => {
                if(!isUserName(value) && value != '') {
                    callback(new Error('用户名必须为字母、数字或下划线!'));
                } else {
                    callback();
                }
            };
            // 验证密码是否合法
            let checkPassword = (rule, value, callback) => {
                if(!isPassword(value) && value != "") {
                    callback(new Error('密码必须为字母或数字!'));
                } else {
                    callback();
                }
            };
            return {
                uuid:'',
                link:'',//iframe链接
                link2:'',//iframe链接
                currentPage: 1, //默认显示页面为1
                pagesize: 10, // 每页的数据条数
                tableTotal:'',
                tableData: [],
                multipleTable: [],     //存放选中值的数组
                Detail : {
                    id:"",
                    enterpriseScoreNumber: "",
                    enterpriseName: "",
                    enterpriseIdNumber:"",
                    enterpriseIdType: "",
                    enterpriseScore: "",
                    enterpriseClassification: "",
                    assessmentDate:'',
                    status: "",
                    createTime: "",
                    createUser: "",
                    updateTime: "",
                    updateUser : ""
                },
                Clue : {
                    id:"",
                    enterpriseName: "",
                    enterpriseIdNumber:"",
                    enterpriseIdType: "",
                    creditClueReasons: "",
                    negativeDetails: "",
                    provincial:'',
                    municipalLevel: "",
                    countyLevel: "",
                    nationalStandard1Name: "",
                    nationalStandard2Name: "",
                    nationalStandard3Name: "",
                    nationalStandard4Name: "",
                    evaluationDate: "",
                    status : ""
                },
				clueDisplay : false,
                provinceValue:'',
                cityValue:'',
                areaValue:'',
                provinceData: [],
                cityData: [],
                areaData: [],
                viewdialogForm: false,
                viewcluedialogForm: false,

                rules: {
                    enterpriseName: [{
                        required: true,
                        message: '请输入企业名称',
                        trigger: 'blur'
                    },{
                        max : 500,
                        message : '长度最大为500个字符',
                        trigger : 'blur'
                    }],
                    enterpriseIdType: [{
                        required: true,
                        message: '请输入企业证件类型',
                        trigger: 'blur'
                    },{
                        max : 500,
                        message : '长度最大为500个字符',
                        trigger : 'blur'
                    }],
                    enterpriseIdNumber: [{
                        required: true,
                        message: '请输入企业证件号码',
                        trigger: 'blur'
                    }],
                    enterpriseClassification: [{
                        required: true,
                        message: '请输入企业分类',
                        trigger: 'blur'
                    },{
                        max : 500,
                        message : '长度最大为500个字符',
                        trigger : 'blur'
                    }],
                    enterpriseScore: [{
                        required: true,
                        message: '请输入企业分数',
                        trigger: 'blur'
                    }],
                    status: [{
                        required: true,
                        message: '请输入信用评估状态',
                        trigger: 'blur'
                    }],
                    assessmentDate: [{
                        required: true,
                        message : '请输入评估日期',
                        trigger : 'blur'
                    }],
                    creditClueReasons: [{
                        required: true,
                        message: '信用线索原因',
                        trigger: 'blur'
                    },{
                        max : 500,
                        message : '请输入长度最大为500个字符',
                        trigger : 'blur'
                    }],
                    negativeDetails: [{
                        required: true,
                        message: '请输入涉及负面详情',
                        trigger: 'blur'
                    },{
                        max : 500,
                        message : '长度最大为500个字符',
                        trigger : 'blur'
                    }]                                      
                },
                formInline: {
                    enterpriseName: ''
                },
                selectForm: {
                    enterpriseClassification: '',
                    startScore: '',
                    endScore: '',
                    enterpriseName: '',
                    status: ''
                },
                companyInformation: [],

        		formDisabled:false,
                hasApprovalBtn:true,
                exportList:[]
            }
        },
        created(){
            var userInfo = JSON.parse(localStorage.getItem('userInfo'));
            var userRole = userInfo.orgName;
            if(userRole.includes("建设单位")){
                this.hasApprovalBtn = false;
            }
          /*  axios.get('../../json/ChinaCity.json').then(res=>{
                this.provinceData = res.data;
            }).catch(e => {
                this.$message.error("网络连接超时");
            })*/
        },
        mounted(){
            this.getData();
        },
        methods: {
            getData() {
                var pagesize = this.pagesize;
                var pageno = this.currentPage;
                axios({
                    method: 'get',
                    url: '/dzjportal/creditinfobase/creditinfoList',
                    params: {
                        pageSize: pagesize,
                        pageNo: pageno,
                        enterpriseClassification: this.selectForm.enterpriseClassification,
                        enterpriseScoreBegin: this.selectForm.startScore,
                        enterpriseScoreEnd: this.selectForm.endScore,
                        enterpriseName: this.selectForm.enterpriseName,
                        status:this.selectForm.status,
                    }
                })
				.then(response => {
					if (response.data.code == 200) {
						this.tableData = response.data.data.data.results;
						this.tableTotal = response.data.data.data.total;// 数据长度

					} else {
						this.$message.error(data.msg);
					}
				})
				.catch(function (error) {
					console.log(error);
				});
            },

            //获取UUID的方法
            getUuid() {
                axios({
                    method: 'get',
                    url: '/dzjportal/uuid/getUuid',
                })
                    .then(response => {
                        console.log(response);
                        if (response.data.code == 200) {
                            this.uuid = response.data.data;
                            this.link="../upload/annex.html?uuid="+this.uuid+"&flag=1";
                            this.link2="../upload/annex.html?uuid="+this.uuid+"yyzz"+"&flag=1";
                            console.log(this.uuid);
                        } else {
                            this.$message.error(response.data.msg);
                        }
                    })
                    .catch(function (error) {
                        console.log(error);
                    });
            },
			clearClueForm() {
                this.Clue.id="";
                this.Clue.enterpriseName= "";
                this.Clue.enterpriseIdNumber="";
                this.Clue.enterpriseIdType= "";
                this.Clue.creditClueReasons= "";
                this.Clue.negativeDetails= "";
                this.Clue.provincial='';
                this.Clue.municipalLevel= "";
                this.Clue.countyLevel= "";
                this.Clue.nationalStandard1Name= "";
                this.Clue.nationalStandard2Name= "";
                this.Clue.nationalStandard3Name= "";
                this.Clue.nationalStandard4Name= "";
                this.Clue.evaluationDate= "";
                this.Clue.status = "";
                this.clueDisplay = false;
			},
// 判断查询分数
            checkPriseScore(){
                var val = this.selectForm.startScore;
                if(val == ''){
                    return ;
                }

                if(val <= 1000){
                    val = 1000;
                }else if(val >= 2000){
                    val = 2000;
                }

                this.selectForm.startScore = val;
            },
            // 判断添加分数
            checkPriseScore1(){
                var val = this.selectForm.endScore;
                if(val == ''){
                    return ;
                }

                if(val <= 1000){
                    val = 1000;
                }else if(val >= 2000){
                    val = 2000;
                }

                this.selectForm.endScore = val;
            },
            //公用方法，不能输入e和点
            channelInput(e){
                var key = e.key;
                if(key === 'e' || key === '.' || key === '+' || key === '-' || key === '*'){
                    e.returnValue = false;
                    return false;
                }
                return true;
            },
            clearForm(){
                this.showMoveOutList = false;
                this.showMoveInList = false;
                
                /*this.$nextTick(()=>{
                	this.$refs['constructionUnitEntity'].resetField();
                })*/
                this.clearFromInformation();
            },
            // 清空表单
            clearFromInformation(){
                this.constructionUnitEntity.entName = "";
				this.constructionUnitEntity.location ="";
				this.constructionUnitEntity.businessLicense = "";
				this.constructionUnitEntity.detailedAddr = "";
				this.constructionUnitEntity.establishTime = "";
				this.constructionUnitEntity.userName = "";
				this.constructionUnitEntity.password ='';
				this.constructionUnitEntity.postalCode = "";
				this.constructionUnitEntity.legalPerson = "";
				this.constructionUnitEntity.entType = "";
				this.constructionUnitEntity.linkTel = "";
				this.constructionUnitEntity.linkMan = "";
				this.constructionUnitEntity.email = "";
				this.constructionUnitEntity.bgTel = "";
				this.constructionUnitEntity.uniscid ="";
                this.provinceValue ='';
                this.cityValue ='';
                this.areaValue ='';
            },
            handleChange(value) {
                console.log(value);
            },
            handleSelectionChange(val) {
            	console.log(val);
    			this.multipleTable = val;               //  this.multipleTable 选中的值
    			console.log(this.multipleTable)
		      	
		    },
		    //导出
            appovalEx(){
            	this.$confirm('确定要导出吗?', '提示', {
                    cancelButtonText: '取消',
                    confirmButtonText: '确定',
                    type: 'warning'
                }).then(() => {
	                window.location.href="/dzjzfjg/detail/export?enterpriseClassification="+this.selectForm.enterpriseClassification+"&enterpriseScoreBegin="
	                    +this.selectForm.startScore+"&enterpriseScoreEnd="
	                    +this.selectForm.endScore+"&enterpriseName="
	                    +this.selectForm.enterpriseName+"&status="
	                    +this.selectForm.status;
	            }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消导出'
                    });
                });
            },
            /* 列表页搜索 */
            searchForm(selectForm) {
                var pagesize = this.pagesize;
                this.currentPage = 1;
                axios({
                    method: 'get',
                    url: '/dzjportal/creditinfobase/creditinfoList',
                    params: {
                        pageSize: pagesize,
                        pageNo: this.currentPage,
                        enterpriseClassification: this.selectForm.enterpriseClassification,
                        enterpriseScoreBegin: this.selectForm.startScore,
                        enterpriseScoreEnd: this.selectForm.endScore,
                        enterpriseName: this.selectForm.enterpriseName,
                        status:this.selectForm.status,
                    }
                })
                .then(response => {
                    if (response.data.code == 200) {
                        let dataInformation = response.data.data.data.results;
                        this.tableTotal = response.data.data.data.total;// 数据长度
                        this.tableData = dataInformation;
                    } else {
                        this.$message.error(response.data.msg);
                    }
                })
                .catch(function (error) {
                    console.log(error);
                });
            },
            //重置
            resetForm(formName) {
                this.$refs[formName].resetFields();
                this.searchForm();
            },
            //每页下拉显示数据
            handleSizeChange(size) {
                this.pagesize = size;
                this.getData();
                /*console.log(this.pagesize) */
            },
            //点击第几页
            handleCurrentChange(currentPage) {
                this.currentPage = currentPage;
                this.getData();
            },
            // 设置允许填写和不允许填写
            checkDisabled(n){
                if(n){
                    this.formDisabled = true;
                }else{
                    this.formDisabled = false;
                }
            },
            // 查看企业信用详情
            view(index,row){            
                this.viewdialogForm = true;
                this.Detail = row;
            },
            // 查看信用线索企业详情
            viewClue(index,row){
                this.viewcluedialogForm = true;
                debugger;
                axios({
                    method : 'get',
                    url : '/dzjportal/creditinfobase/findClue',
                    params : {
                        enterpriseIdNumber : row.enterpriseIdNumber
                    }
                })
                .then(response => {
                    debugger;
                   let data = response.data;
                   if(data.code == 200) {
                       this.clearClueForm();
                       this.clueDisplay = data.isClue;
                       this.Clue = data.data;
                   } else {
                       this.$message.error(data.msg);
                   }

                })
                .catch(function(error){
                   console.log(error);
                });
            },
            chooseProvince(value){
                this.cityValue = '';
                this.areaValue = '';
                this.cityData = [];
                this.areaData = [];
                this.provinceData.map(e=>{//遍历数据
                    if( value == e.name){
                        this.cityData = e.cityList;
                        return;
                    }
                })
                console.log(value)
                this.constructionUnitEntity.location = value;
            },
            chooseCity(value){
                this.areaValue = '';
                this.cityData.map(e=>{//遍历数据
                    if( value == e.name){
                        this.areaData = e.areaList;
                        return;
                    }
                })
                this.constructionUnitEntity.location=this.constructionUnitEntity.location +"-" +value;
                console.log(this.constructionUnitEntity.location)
            },
            chooseArea(value){
                this.constructionUnitEntity.location=this.constructionUnitEntity.location +"-" +value;
            },
            // 验证字符串是否为邮箱
            isEmail(str) {
                let re = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/
                if (re.test(str)) {
                    return true;
                } else {
                    return false;
                }
            },
            /*返回首页*/
            gobackmain(){
                parent.mainwork.backIndex();
            },
            //批量导出
            appovalEx(){
                this.$confirm('确定要批量导出吗?', '提示', {
                    cancelButtonText: '取消',
                    confirmButtonText: '确定',
                    type: 'warning'
                }).then(() => {
                    window.location.href="/dzjportal/creditinfobase/export?enterpriseName="+this.selectForm.enterpriseName+"&enterpriseScoreBegin="
                        +this.selectForm.startScore+"&enterpriseScoreEnd="+this.selectForm.endScore+"&enterpriseClassification="+this.selectForm.enterpriseClassification;
                }).catch(() => {
                    this.$message({
                        type: 'info',
                        message: '取消导出'
                    });
                });
            },
            handleSelectionChange(val) {
                this.exportList = val;
            },
            //导出
            appovalExByIds(){
                if(this.exportList.length >0){
                    this.ids = this.exportList.map(function(exportList,index){
                        return exportList.id;
                    }).join(",");
                    this.$confirm('确定要导出所选数据吗?', '提示', {
                        cancelButtonText: '取消',
                        confirmButtonText: '确定',
                        type: 'warning'
                    }).then(() => {
                        window.location.href="/dzjportal/creditinfobase/exportByIds?ids="+this.ids
                    }).catch(() => {
                        this.$message({
                            type: 'info',
                            message: '取消导出'
                        });
                    });
                }else {
                    this.$message('请选择要导出的数据！');
                }
            }
        }
    })
</script>
</body>
</html>